package cn.xinfei.xdecision.common.utils.enums.enginex;

/**
 * @author wangguangchun
 * @version 1.0
 * @date 2022/5/19 6:36 下午
 * 拒绝分支码属性
 */

public enum RejectBranchCodeAttrEnum {
    REJECT("R", "拒绝规则"),
    MONITOR("K", "监控规则"),
    ;
    private String code;
    private String desc;

    RejectBranchCodeAttrEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static RejectBranchCodeAttrEnum getRejectBranchCodeAttr(String code) {
        for (RejectBranchCodeAttrEnum s : RejectBranchCodeAttrEnum.values()) {
            if (s.getCode().equals(code)) {
                return s;
            }
        }
        return null;
    }

}
